@var head = {
	<title>设置资源</title>
@};
@var content = {
	<div class="pd-20">
		<div class="text-c">
			<form action="${request.contextPath}/action/ressearch.html?aid=${actionId}" method="post">
				<span class="select-box" style="width:100px">
					<select name="selFlag" class="select">
						@if(selFlag == "1"){
							<option value="1" selected>已选</option>
					    	<option value="2">未选</option>
						@}else{
							<option value="1">已选</option>
					    	<option value="2" selected>未选</option>
						@}
					    
					 </select>
				 </span>
				<input type="text" class="input-text" style="width:250px" placeholder="输入资源名称" id="" name="resName" value="${resName!''}">
				<button type="submit" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜资源</button>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20"> 
			<span class="l">
				@if(selFlag == "1"){
					<a href="javascript:;" onclick="removeResources()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 取消设置</a>
				@}else{
					<a href="javascript:;" onclick="setResources()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe61d;</i> 设置资源</a>
				@}
			</span>
			<span class="r">
				共有数据：<strong>${total}</strong> 条
			</span> 
		</div>
		<table class="table table-border table-bordered table-bg">
			<thead>
				<tr>
					<th scope="col" colspan="9">资源列表</th>
				</tr>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="50">类别</th>
					<th width="100">编码</th>
					<th width="150">名称</th>
					<th width="100">是否已启用</th>
				</tr>
			</thead>
			<tbody id="dataContent">
				
			</tbody>
		</table>
		<div id="pager" style="padding-top:5px;float:right"></div>
	</div>
	<footer class="footer">
   		<p>本后台系统由<a href="http://www.h-ui.net/" target="_blank" title="H-ui前端框架">H-ui前端框架</a>提供前端技术支持</p>
	</footer>
@};
@var js = {
	<script>
		$(document).ready(function () {
			pager('${request.contextPath}/action/reslist.html', {selFlag : "${selFlag!'1'}", actionId : "${actionId!''}", resourceName : "${resName!''}"}, ${total}, 6);
		});
		function removeResources(){
			var options = {
					ajaxurl : "${request.contextPath}/action/removeresources.html",
					ajaxdata : {actionId : "${actionId!''}"}
				};
				selMultiToRequest(options);
		}
		function setResources(){
			var options = {
				ajaxurl : "${request.contextPath}/action/setresources.html",
				ajaxdata : {actionId : "${actionId!''}"}
			};
			selMultiToRequest(options);
		}
	</script>
@};
@include("/layout/layout.html",{head:head,content:content,js:js}){}